<template>
	<view>
		<view class="blank"></view>
		<view class="flexItem ">
			<view class="flexItemMain ">
				<view class="flexItemCenter">
					手机绑定：
				</view>
                <view class="rightTitle">159****7250</view>
				<image src="../../static/pages/int.png" class="flexItemRightImg" mode=""></image>
			</view>
			<view class="flexItemXian"></view>
		</view>
		<view class="flexItem ">
			<view class="flexItemMain " @click="logout">
				<view class="flexItemCenter">
					注销账户
				</view>
		
				<image src="../../static/pages/int.png" class="flexItemRightImg" mode=""></image>
			</view>
			<view class="flexItemXian"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
           logout() {
			  //0未关注  1已关注
			  let that = this
			  uni.showModal({
			  	title: '注销提示',
			  	content:"是否注销账户",
			  	success: (showResult) => {
			  		if (showResult.confirm) {
			  			that.$utils.postrequest("/api/user/cancellation", {}, function(res) {
			  				if (res.code == 200) {
			  					that.goLogin()
			  				}
			  			})
			  		}
			  	}
			  })
		   },
		   goLogin() {
			   uni.navigateTo({
			   	url: '/pages/login/login'
			   })
		   }
		}
	}
</script>

<style>
	.blank {
		width: 100%;
		height: 2rpx;
		background-color: #D1CFDD;
		margin-bottom: 10rpx;
	}

	.flexItemMain {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 35rpx 0;
	}

	.flexItemLeft {
		flex: none;
		border-radius: 100%;
		overflow: hidden;
		width: 60rpx;
		height: 60rpx;
		margin-left: 30rpx;
		margin-right: 27rpx;
	}

	.flexItemCenter {
		flex: auto;
		text-align: left;
		margin-left: 30rpx;
		font-size: 28rpx;
		
		color: #3F4658;
	}

	.flexItemRightImg {
		width: 24rpx;
		height: 24rpx;
		flex: none;
		margin-right: 30rpx;
		margin-left: 10rpx;
	}
    .rightTitle{
		
		font-size: 28rpx;
		font-family: PingFang SC;
		
		color: #777C88;
	}
	.flexItemXian {
		margin-right: 30rpx;
		margin-left: 30rpx;
		height: 2rpx;
		background-color: #D1CFDD;
	}
</style>
